home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
076-100
/
disk_096
/
animplayer
/
timer.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
1KB
|
54 lines
/***************************************************************************
*
* NAME
* Timer -- set up interrupt handler for frame rate
*
* SYNOPSIS
* Timer();
*
* DESCRIPTION
* To ensure the correct frame rate of animation playback
* interrupts are used to synch to the vertical blanking
* interval.
*
* copyright (c) 1987 Martin D. Hash
*
* LAST EDITED
* Martin Hash 5 Jul 1987
*
* EDIT HISTORY
* 22 Mar 1987 MH Created.
*
**********************************************************************/
#include <exec/types.h>
#include <exec/interrupts.h>
#include <exec/memory.h>
#include <exec/nodes.h>
#include <hardware/intbits.h>
/* EXTERNAL VARIABLES */
extern VOID VertBServer();
/* GLOBAL VARIABLES */
struct Interrupt *VertBIntr;
/* FUNCTION */
void Timer()
{
if ((VertBIntr = (struct Interrupt *)AllocMem( sizeof(struct Interrupt),
MEMF_PUBLIC )) == 0)
exit( 100 );
VertBIntr->is_Node.ln_Type = NT_INTERRUPT;
VertBIntr->is_Node.ln_Pri = -60;
VertBIntr->is_Node.ln_Name = "VBlank_Count";
VertBIntr->is_Data = NULL;
VertBIntr->is_Code = VertBServer;
AddIntServer( INTB_VERTB, VertBIntr );
}